<?php 
/**
 * token 控制器
 * @package Core
 * @author suntianxiang <suntianxiang@sina.cn>
 */

namespace Core;

use Models\User;

class ResourceController extends API_Controller
{

    public function __construct()
    {
        parent::__construct();
        if (!$this->session->authUser) {
            $this->response([], 401);
            exit;
        }

        $user = (new User)->find($this->session->authUser['id']);
        if (!$user) {
            $this->response([], 401);
            exit;
        }   
    }
}